package com.xmb.wcapi.controller;


import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.xmb.wcapi.entity.InventoryHouse;
import com.xmb.wcapi.service.IInventoryHouseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.Map;


/**
 * <p>
 * 仓库值设定 前端控制器
 * </p>
 *
 * @author huangping
 * @since 2024-06-14
 */
@Controller
@RequestMapping("/inventory-house")
public class InventoryHouseController {

    @Autowired
    private IInventoryHouseService houseService;

    @RequestMapping("/edit")
    public String edit(String id, Model model){
        //查询仓库
        Map<String, Object> map = houseService.getMap(Wrappers.lambdaQuery(InventoryHouse.class).eq(InventoryHouse::getInventoryId, id));
        model.addAllAttributes(map);
        return "inventory_house/edit";
    }

}

